@use 'sass:map';
@use 'sass:color';
@use '@angular/material' as mat;

@mixin color($config-or-theme) {
  $config: mat.get-color-config($config-or-theme);
  $background: map.get($config, background);
  $foreground: map.get($config, foreground);
  $primary: map.get($config, primary);
  $accent: map.get($config, accent);

  // .pac-input-control {
  //   // todo
  //   .ngm-member-tree {
  //     flex-direction: column !important;
  //   }
  // }
  
}

@mixin density($config-or-theme) {
  .pac-input-control {
    .ngm-parameter {
      .mat-slider-thumb-label-showing {
        &.mat-slider-horizontal {
          margin-top: 1rem;
          margin-left: 1rem;
          margin-right: 1rem;
        }
  
        &.mat-slider-vertical {
          margin-left: 1rem;
          margin-top: 1rem;
          margin-bottom: 1rem;
        }
      }
    }
  }
}

@mixin typography($config-or-theme) {
}

@mixin theme($theme) {
  $color: mat.get-color-config($theme);
  $density: mat.get-density-config($theme);
  $typography: mat.get-typography-config($theme);

  @if $color != null {
    @include color($color);
  }
  @if $density != null {
    @include density($density);
  }
  @if $typography != null {
    @include typography($typography);
  }
}
